import request from '@/utils/request'


/** 
 * 考试科目
*/
export const getSubjectList = (data) => {
    return request({
        url: '/system/exam/subject/list',
        method: 'get',
        params: data
    })
}

/** 
 * 评阅进度-表格
*/
export const getPyjdTable = (id) => {
    return request({
        url: '/task/assignment/config/review/list/' + id,
        method: 'get',
    })
}

/** 
 * 评阅进度-变更评阅状态（单个）
*/
export const updatePyjdStatus = (data) => {
    return request({
        url: '/task/assignment/config/review/status',
        method: 'get',
        params: data
    })
}

/** 
 * 评阅进度-变更评阅状态（全部）
*/
export const updatePyjdStatusAll = (data) => {
    return request({
        url: '/task/assignment/config/review/project/status',
        method: 'get',
        params: data
    })
}

/** 
 * 评阅进度-重新评阅
*/
export const reEvaluate = (data) => {
    return request({
        url: '/task/assignment/config/reEvaluate',
        method: 'post',
        data: data
    })
}
/** 
 * 评阅进度-查询重评题组下拉
*/
export const getReEvaluateGroupSelect = (data) => {
    return request({
        url: '/task/assignment/config/examSubjectToGroup',
        method: 'get',
        params: data
    })
}
/** 
 * 评阅进度-查询评阅教师下拉
*/
export const getReviewerTeacherSelect = (data) => {
    return request({
        url: '/task/assignment/config/group/teachers',
        method: 'post',
        data: data
    })
}
/** 
 * 评阅进度-制定评阅教师下拉
*/
export const getRatingTeacherSelect = (data) => {
    return request({
        url: '/task/assignment/config/exam/teachers',
        method: 'get',
        params: data
    })
}
/** 
 * 评阅进度-导出全科进度
*/
// export const exportPyjd = (data) => {
//     return request({
//         url: '/task/assignment/config/review/export',
//         method: 'get',
//         responseType: "blob",
//         params: data
//     })
//}

export const exportPyjd = (data) => {
    return request({
        url: '/task/assignment/config/exportExamUnReviewInfo',
        method: 'get',
        responseType: "blob",
        params: data
    })
}

/** 
 * 评阅进度-过滤未上传
*/
export const filterPyjd = (data) => {
    return request({
        url: '/task/assignment/config/review/filter',
        method: 'get',
        params: data
    })
}

/** 
 * 评阅进度-消息推送
*/
export const sendMessage = (data) => {
    return request({
        url: '/task/assignment/config/review/notice',
        method: 'get',
        params: data
    })
}


/** 
 * 评阅详情-列表
*/
export const getPyxqDetailList = (data, id) => {
    return request({
        url: '/task/teacher/stats/review/list/' + id,
        method: 'get',
        params: data
    })
}
/** 
 * 评阅详情-题组下拉
*/
export const getPyxqGroupSelect = (data) => {
    return request({
        url: '/task/teacher/stats/object/list',
        method: 'get',
        params: data
    })
}
/** 
 * 评阅详情-学校下拉
*/
export const getSchoolSelect = (data) => {
    return request({
        url: '/task/teacher/stats/school/list',
        method: 'get',
        params: data
    })
}
/** 
 * 评阅详情-导出进度
*/
export const exportPyjdProgress = (data) => {
    return request({
        url: '/task/teacher/stats/review/export/teacher',
        method: 'get',
        responseType: "blob",
        params: data
    })
}
export const exportPyjdProgressschool = (data) => {
    return request({
        url: '/task/teacher/stats/review/export/school',
        method: 'get',
        responseType: "blob",
        params: data
    })
}
export const reviewexportexception = (data) => {
    return request({
        url: '/exception/handling/review/export/exception',
        method: 'get',
        responseType: "blob",
        params: data
    })
}

/*
* 评阅概览-题目列表
**/
export const xmglTopicList = (id) => {
    return request({
        url: '/task/teacher/stats/overview/subject/' + id,
        method: 'get',
    })
}

/**
 * 评阅概览-概览列表
*/
export const xmglOverviewList = (data) => {
    return request({
        url: '/task/teacher/stats/review/overview',
        method: 'get',
        params: data
    })
}
/**
 * 评阅概览-教师下拉
*/
export const getTeacherSelect = (data) => {
    return request({
        url: '/task/teacher/stats/teachers/' + data.examId,
        method: 'get',
        params: data
    })
}
/**
 * 异常处理-列表
*/
export const ycclExceptionList = (data, id) => {
    return request({
        url: '/exception/handling/list/' + id,
        method: 'get',
        params: data
    })
}
// 获取第一条数据详情
export const getFirstDetail = (id, params) => {
    return request({
        url: '/exception/handling/exception/' + id,
        method: 'get',
        params: params
    })
}

// 获取答题卡详情
export const getCardDetail = (data, id) => {
    return request({
        url: '/exception/handling/scan/details',
        method: 'get',
        params: data
    })
}

// 提交处理结果
export const submitResult = (data, id) => {
    return request({
        url: '/exception/handling/processed/' + id,
        method: 'get',
        params: data
    })
}

// 报废题目
export const scrapQuestion = (data) => {
    return request({
        url: '/exception/handling/scrap/flag',
        method: 'post',
        data: data
    })
}
//上传模板文件
export function updatamodelcase(data) {
    return request({
        url: '/exception/handling/re/upload/url',
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data: data
    })
}
// 修改答题卡坐标
export function updateCardPosition(data) {
    return request({
        url: '/exception/handling/edit/answer/sheet',
        method: 'post',
        data: data
    })
}
// 重传提卡-提交
export function reSubmitCard(data) {
    return request({
        url: '/exception/handling/re/upload',
        method: 'post',
        data: data
    })
}

// 切换题卡
export function switchCard(data) {
    return request({
        url: '/exception/handling/order/witch',
        method: 'get',
        params: data
    })
}

// 旋转答题卡
export function rotateCard(data) {
    return request({
        url: '/exception/handling/rotateImage',
        method: 'post',
        data: data
    })
}



// 统计
export function statistics(data) {
    return request({
        url: '/task/teacher/assignment/reviewed/count',
        method: 'get',
        params: data
    })
}


/**
 * 是否打过分
 */
export function getIsRated(data) {
    return request({
        url: '/exception/handling/scrap/hasRated',
        method: 'post',
        data: data
    })
}


// 获取更新时间
export function getRefreshTime(data) {
    return request({
        url: '/task/teacher/assignment/reviewed/count/date',
        method: 'get',
        params: data
    })
}

// 删除用户信息
export function delUserInfo(data) {
    return request({
        url: '/task/assignment/config/launchLogin',
        method: 'get',
        params: data
    })
}

// 查询考试科目分页列表
export const subjectpage = (query) => {
    return request({
        url: '/system/exam/subject/page',
        method: 'get',
        params: query
    })
}

// 新增考试科目
export const subjectAdd = (query) => {
    return request({
        url: '/system/exam/subject',
        method: 'post',
        data: query
    })
}

// 修改考试科目
export const subjectEdit = (query) => {
    return request({
        url: '/system/exam/subject',
        method: 'put',
        data: query
    })
}

// 删除考试科目
export const subjectDel = (query) => {
    return request({
        url: '/system/exam/subject/' + query,
        method: 'delete'
    })
}


export const getExamUnReviewInfo = (query) => {
    return request({
        url: '/task/assignment/config/getExamUnReviewInfo',
        method: 'get',
        params: query
    })
}

//全部进度
export const allProgresslist = (query) => {
    return request({
        url: '/task/assignment/config/review/examList',
        method: 'get',
        params: query
    })
}